$(document).ready(function() {

	$("#NewWorker").validate({
		rules: {			
			worker_name: {
				required: true,
				minlength: 2,
				maxlength:5
			},
			worker_groupid: "required",
		},
		messages: {
			event_title: {
				required: "管理员名字不能为空",
				minlength: "名字不能少于2个字符",
				maxlength:'名字不能多于5字符'
			}
		}
	});
	$("input[name='is_charger_1']").click(function(){
		$("input[name='is_charger']").val($("input[name='is_charger_1']:checked").val());											   
	})
});